﻿using System;
using System.Net;
using System.Web;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;

namespace FXC.Web.Utility
{
    public class GetFXContent
    {
        private WebClient client = new WebClient();
        public string GetFXContentValue()
        {
            string fxContent = string.Empty;
            try
            {
                fxContent = client.DownloadString("http://www.bee4rex.com/appinterface/get_currate.aspx");
            }
            catch (Exception ex)
            {
                var exManager = EnterpriseLibraryContainer.Current.GetInstance<ExceptionManager>();

                exManager.HandleException(ex, "Final Policy");
            }

            return fxContent;
        }
    }
}